package com.wechat.apidoc;

import com.wechat.utils.ActionResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;

/**
 * Created by ycx on 2018/4/13.
 */
@Api(description = "记录接口文档")
public interface WxRecordInterface {

    @ApiOperation(value = "查看题目", notes = "" +
            "\"data\": {\n" +
            "    \"question\": \"试题题目\",\n" +
            "    \"trueAnswer\": \"用户设置的正确答案\",\n" +
            "  };\n" +
            "\"question\":{\n" +
            "    \"id\":\"出题记录编号\",\n" +
            "    \"amountStatus\":\"红包状态: 0待支付 1 红包已领完 2红包未领完 3已退回\",\n" +
            "  };"
    )
    @ApiImplicitParams({
            @ApiImplicitParam(name = "questionId", value = "出题记录编号", paramType = "query", required = true, dataType = "int"),
            @ApiImplicitParam(name = "key", value = "用户秘钥", paramType = "query", required = true, dataType = "String")
    })
    ActionResult selQuestionList(Integer questionId, String key);

    @ApiOperation(value = "使用当前题目再来一发", notes = "data:新的问题ID")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "questionId", value = "出题记录编号", paramType = "query", required = true, dataType = "int"),
            @ApiImplicitParam(name = "key", value = "用户秘钥", paramType = "query", required = true, dataType = "String")
    })
    ActionResult useCurrentQuestion(Integer questionId, String key);

    @ApiOperation(value = "单个好友的答题记录", notes = "" +
            "\"data\": {\n" +
            "    \"name\": \"试题题目\",\n" +
            "    \"answer\": \"答题者的答案\",\n" +
            "    \"isRight\": \"是否正确(0-错误，1-正确)\",\n" +
            "  };\n" +
            "\"user\":{\n" +
            "    \"nickname\":\"用户昵称\",\n" +
            "    \"avatarUrl\":\"用户头像\",\n" +
            "  };"
    )
    @ApiImplicitParams({
            @ApiImplicitParam(name = "userId", value = "答题者的id", paramType = "query", required = true, dataType = "int"),
            @ApiImplicitParam(name = "answerId", value = "答题记录编号", paramType = "query", required = true, dataType = "int"),
            @ApiImplicitParam(name = "key", value = "用户秘钥", paramType = "query", required = true, dataType = "String")
    })
    ActionResult selAnswerDetailExt(Integer answerId, Integer userId, String key);

    @ApiOperation(value = "我发出的 页面展示", notes = "" +
            "\"data\": {\n" +
            "    \"id\": \"出题记录编号\",\n" +
            "    \"totalNumber\": \"总红包数\",\n" +
            "    \"surplusNumber\": \"剩余红包数\",\n" +
            "    \"totalAmount\": \"总红包金额\",\n" +
            "    \"accountAmount\": \"红包余额\",\n" +
            "    \"amountStatus\": \"红包状态: 0待支付 1 红包已领完 2红包未领完 3已退回\",\n" +
            "    \"createTime\": \"创建时间\",\n" +
            "    \"answerExtList\":{\n" +
            "       \"id\":\"答题记录编号\",\n" +
            "       \"amount\":\"获得红包\",\n" +
            "       \"totalRight\":\"正确的题目数\",\n" +
            "       \"totalNumber\":\"总题目数\",\n" +
            "       \"userId\":\"答题者的id\",\n" +
            "       \"nickname\":\"答题者的昵称\",\n" +
            "       \"avatarUrl\":\"微信头像地址\",\n" +
            "    };\n" +
            "  };\n" +
            "\"totalAmount\":\"我发出去的红包总金额\",\n" +
            "\"totalNumber\":\"我发出去的红包总数\",\n"
    )
    @ApiImplicitParams({
            @ApiImplicitParam(name = "key", value = "用户秘钥", paramType = "query", required = true, dataType = "String")
    })
    ActionResult showISend(String key);

    @ApiOperation(value = "我收到的 页面展示", notes = "" +
            "\"data\": {\n" +
            "    \"id\": \"答题记录编号\",\n" +
            "    \"userId\": \"用户编号\",\n" +
            "    \"questionId\": \"出题记录编号\",\n" +
            "    \"totalNumber\": \"总题目数\",\n" +
            "    \"totalRight\": \"正确的题目数\",\n" +
            "    \"createTime\": \"答题创建时间\",\n" +
            "    \"endTime\": \"答题结束时间\",\n" +
            "    \"amount\": \"获得红包(显示在获得后面)\",\n" +
            "    \"dataState\": \"状态: 0未提交, 1已提交, 2提交失败\",\n" +
            "    \"delFlag\": \"是否删除 0-未删除，1-已删除\",\n" +
            "    \"nickname\":\"答题者的昵称\",\n" +
            "    \"avatarUrl\":\"微信头像地址\",\n" +
            "  };\n" +
            "\"totalAmount\":\"我收到的红包总金额\",\n" +
            "\"totalNumber\":\"我收到的红包总数\",\n"
    )
    @ApiImplicitParams({
            @ApiImplicitParam(name = "key", value = "用户秘钥", paramType = "query", required = true, dataType = "String")
    })
    ActionResult showIReceived(String key);

}





























